#ifndef QHISTORYDATABASEVIEW_H
#define QHISTORYDATABASEVIEW_H

#include "../corelibglobal.h"

#include <QWidget>
#include <QMap>

class QDataBaseListView;
class StyledBar;
class QSqliteControl;
class QDataPanelWidget;
class QSqlQuery;

class CORELIB_EXPORT QHistoryDatabaseView : public QWidget
{
    Q_OBJECT
public:
    explicit QHistoryDatabaseView(QWidget *parent = 0);
    ~QHistoryDatabaseView();

    void    set_toolbar(QWidget* wid);

    bool    load(const QString &path);
signals:
    void    has_data(bool has);
public slots:
    void    select(const QString &name);
    void    clear();
    void    show_info();
protected:
    QDataBaseListView       *m_data_list_view;
    StyledBar           *m_styledbar;
    QSqliteControl      *m_sqlite_control;
    QMap<QString,QString>   m_name_to_uuid;
    QDataPanelWidget        *m_data_panel_widget;
    QMap<QString,QSqlQuery*> m_name_to_query;
};

#endif // QHISTORYDATABASEVIEW_H
